<p id="notice">
	<%= notice %>
</p>

<p>
	<b>Login:</b>
	<%= @user.login %>
</p>

<p>
	<b>Mail:</b>
	<%= @user.mail %>
</p>
<% if @user.admin? %>
<p>
	<b>Admin:</b>
	<%= @user.admin %>
</p>
<% end %>
<p>
	<b>Mail notification:</b>
	<%= @user.mail_notification %>
</p>
<%= link_to 'Edit', edit_user_path(@user) %> |
<%= link_to 'Back', root_path %>
<hr />
<p>
	<h3>Your collections :</h3>
</p>
<% @user_collections.each do |uc| %>
<%= uc %>&emsp;<%= link_to "Show", collection_path(uc)%>
<% end %>
<hr />

<div class="rates">

	<p>
		<h3>Your rates :</h3>
	</p>

	<div class="rate">
		<% @user_collection_ratings.each do |ucr| %>
		<%= Collection.find_by_id(ucr.collection_id) %>
		Rate: <%= ucr.rate %><br />
		Comment: <%= ucr.comment %>
		<% end %>
	</div>

	<div class="rate">
		<% @user_book_ratings.each do |ubr| %>
		<%= Book.find_by_id(ubr.book_id) %><br />
		Rate: <%= ubr.rate %><br />
		Comment: <%= ubr.comment%>
		<% end %>
	</div>

</div>

<hr />

